/***************************************************
  File: include/control.h
  Description: Audio Cup Generic Control ( header )
  Author: Brant Anderson
  Date: 10/25/01
  Last Update: 10/29/01
  Status: Working
  To Do:
 ***************************************************/



#define MP3 10
#define OGG 20

#include <sys/types.h>
#include "xaudio/player.h"
#include "xaudio/control_pipe.h"

typedef enum {
	PLAYER_NONE,
	PLAYER_ERROR,
    PLAYER_OPEN,
    PLAYER_PLAY,
    PLAYER_PAUSE,
    PLAYER_STOP
} State;

#ifndef SONGINFO
 #define SONGINFO
 #define MP3 10
 #define OGG 20
 typedef struct {
     int scroller;
     char artist[64];
     char album[64];
     char track[64];
     char title[64];
     
     char *playlist;
     char *filename;
     int ctype;
     int songnum;
     int loop;
 } SongInfo;
#endif

int openSong( SongInfo songinf );

XA_Control *getXAPlayer( );

void openXA( XA_Control *player, char *filename );
void playXA( XA_Control *xaPlayer );
void pauseXA( XA_Control *xaPlayer );
void stopXA( XA_Control *xaPlayer );
void seekXA( XA_Control *xaPlayer, unsigned short offset );
void exitXA( XA_Control *xaPlayer );

int getXAMessage( XA_Control *xaPlayer, XA_Message *xaMessage );
